// === class for moving show speed  === //
class cspeedCtrl {
  cspeedCtrl() {
    medium();
    paused = false;
    slowed = false;
  }

  void fast() {
    moveSteps = 150;
    paused = false; // resume anyway
    slowed = false;
    btnPause.paused = false; // remove button paused attribute
  }

  void medium() {
    moveSteps = 40;
    paused = false; // resume anyway
    slowed = false;
    btnPause.paused = false; // remove button paused attribute
  }

  void slow() {
    moveSteps = 4;
    paused = false; // resume anyway
    slowed = true;
    btnPause.paused = false; // remove button paused attribute
  }

  boolean isSlow() {
    return slowed;
  }

  int getMoveSteps() {
    return moveSteps;
  }

  void pause() {
    paused = true;
  }

  void resume() {
    paused = false;
  }

  private boolean paused;
  private int moveSteps;
  private boolean slowed;
};

cspeedCtrl speedCtrl = new cspeedCtrl();
